x86/svm: add support for pause filtering threshold
authorBrian Woods <brian.woods@amd.com>
Fri, 23 Feb 2018 10:03:36 +0000 (11:03 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Feb 2018 10:03:36 +0000 (11:03 +0100)
commit3af3abe2b76caf6d1e5f20ae17c3a84e2a8037dc
tree57081c1f1fc07a064f12da994d125a5c585b6f41
parent0ace9284f09182ed5c5d1f077f5924252dbcb07e
x86/svm: add support for pause filtering threshold

Add support for enabling the pause filtering threshold feature.  This
causes the pause filtering count to reset if there's pause filtering
threshold cycles or greater between pauses.  See AMD APM Vol 2 Section
15.14.4 for more details.

The values of the pause filtering count and threshold were found by
iterating over different values of the count and threshold while running
kernbench and a pi spigot algorithm with yields placed in it.  A
balanced setting for both variable provides:

(Using averaged elapsed time with kernbench)
old = 852.0
new = 848.8
improvement = .4%

For system without pause filtering threshold, the change, from 3000 to
4000 for the count, should not negatively effect system performance.

Signed-off-by: Brian Woods <brian.woods@amd.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/include/asm-x86/hvm/svm/svm.h
xen/include/asm-x86/hvm/svm/vmcb.h